﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="JenisDokumen.aspx.vb" Inherits="bisaska.JenisDokumen" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<form id="form1" runat="server">
<asp:ScriptManager ID="DivisiScriptManager" runat="server" EnablePartialRendering="true" EnablePageMethods="true"/>
<asp:UpdatePanel ID="up" runat="server">
<ContentTemplate>
<asp:GridView ID="test_grid" 
              runat="server" 
              AllowPaging="True"
              AllowSorting="True" 
              AutoGenerateColumns="False" 
              DataKeyNames="id_jenis_dok"
              DataSourceID="SqlDataSourceTb_Mst_Jenis_Dok" 
              CellPadding="4" 
              GridLines="None" 
              AlternatingRowStyle-CssClass="odd"
              CssClass="table-data">
<Columns>
  <asp:BoundField DataField="id_jenis_dok" HeaderText="ID" InsertVisible="False" ReadOnly="True" SortExpression="id_jenis_dok" />
  <asp:BoundField DataField="jenis_dok" HeaderText="Jenis Dokumen" SortExpression="nama_jenis" />
  <asp:BoundField DataField="deskripsi" HeaderText="Deskripsi" SortExpression="deskripsi" />
  <asp:BoundField DataField="is_active" HeaderText="Status" SortExpression="is_active" />
  <asp:BoundField DataField="tgl_update" HeaderText="TGL UPDATE" SortExpression="tgl_update" />
  <asp:CommandField SelectText="Edit" ShowSelectButton="True" ></asp:CommandField>
  <asp:TemplateField>
    <ItemTemplate>
      <asp:LinkButton ID="deleteButton" runat="server" CommandName="Delete" Text="Delete" OnClientClick="return confirm('Delete data ?');" />
    </ItemTemplate>
  </asp:TemplateField>
  <asp:ButtonField CommandName="btnCopy" Text="Copy" ></asp:ButtonField>
</Columns>
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSourceTb_Mst_Jenis_Dok" runat="server" 
  ConnectionString="<%$ ConnectionStrings:bisaska %>" 
  SelectCommand="SELECT [id_jenis_dok], [jenis_dok], [deskripsi], [is_active] = case [is_active] when 0 then 'Aktif' when 1 then 'Pasif' end, [tgl_update] FROM [T_MST_JENIS_DOK]" 
  
        DeleteCommand="DELETE FROM [T_MST_JENIS_DOK] WHERE [id_jenis_dok] = @id_jenis_dok">
    <DeleteParameters>
      <asp:Parameter Name="id_jenis_dok" Type="Int64" />
    </DeleteParameters>
</asp:SqlDataSource>

<div class="paging">
  <em><asp:Button ID="Button4" runat="server" Text="Add New" CausesValidation="False" CssClass="button" /></em><div style="clear:both;"></div>
</div> 
<table runat ="server" id="tableboy" cellpadding="0" cellspacing="2" border="0" class="table-form">
  <tr>
    <td>Jenis Dokumen</td>
    <td>
      <asp:TextBox ID="textbox1" runat="server" MaxLength="50"></asp:TextBox>
      <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="textbox1" ErrorMessage="*"></asp:RequiredFieldValidator>
    </td>
  </tr>
  <tr>
    <td valign="top">Deskripsi</td>
    <td>
      <asp:TextBox ID="textbox2" runat="server" TextMode="MultiLine" MaxLength="50"></asp:TextBox>
      <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="textbox2" ErrorMessage="*"></asp:RequiredFieldValidator>
    </td>
  </tr>
  <tr>
    <td>Status</td>
    <td>
        <asp:DropDownList ID="DropDownList1" runat="server">
           <asp:ListItem Value="0">Aktif</asp:ListItem>
           <asp:ListItem Value="1">Pasif</asp:ListItem>
        </asp:DropDownList>
    </td>
  </tr>
  <tr>
    <td> </td> 
    <td> 
        <asp:Button ID="Button2" runat="server" Text="Save" CssClass="button"></asp:Button>
        <asp:Button ID="Button3" runat="server" Text="Cancel" CssClass="button" CausesValidation="False"></asp:Button> 
    </td> 
  </tr>
</table>
</ContentTemplate>
</asp:UpdatePanel>  
</form>
</asp:Content>
